import request from '@/utils/request'
// 获取我的频道列表
export const getChannelListAPI = () => request({
  url: 'user/channels'
})
// 获取全部的频道列表
export function getAllChannelsAPI () {
  return request.get('channels')
}

// 删除频道
export function delChannelAPI (channelId) {
  return request.delete(`user/channels/${channelId}`)
}
// 添加频道
export function addChannel (newChannel) {
  return request.put('user/channels', {
    channels: newChannel
  })
}
